package com.spring.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class ResponseController {
    @RequestMapping("mv")
    public ModelAndView index(){
        ModelAndView modelAndView = new ModelAndView();
        //存数据
        modelAndView.addObject("name","kfm");
        //设置逻辑视图的名称
        modelAndView.setViewName("mv");
        return modelAndView;
    }
}
